<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
<title></title>
<link href="console.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
.even {
	background:	#eee;
}

.odd {

}
</style>
</head>

<body>
<jsp:include page="/title.jsp" flush="true"/>
	<p class="lnkhead2"><bean:message key="menu.orgManagers"/>&gt;<bean:write name="domain"  filter="true"/></p>
<table width="100%" border="0" cellpadding="3" cellspacing="1">
	<tr class="lnkhead2" >		
		<td align="left">
		[<bean:write name="userId"/>]<bean:message key="org.belongGroupList"/>
</td>
</tr>
</table>	
<form action="org.do?" method="post" name="form">	
			<table width="100%" border="0" cellpadding="1" class="sort-table" id="table-1" cellspacing="0">
	
	<thead>
			<tr >
			<td align="center" width="5%">&nbsp;
		
				</td>
					<td align="center" width="10%">
					
					<bean:message key="org.groupId"/>
					
				</td>
				<td align="center" width="15%">
					
					<bean:message key="org.groupName"/>
					
				</td>
				
			
				<td align="center" width="15%">
					
					<bean:message key="org.parentGroup"/>
					
				</td>
				<td align="center" width="10%">
					
					<bean:message key="org.manager"/>
					
				</td>				
				<td align="center" width="10%">
					<bean:message key="org.attr1"/>
				</td>
			<td align="center" width="10%">
					<bean:message key="org.attr2"/>
				</td>
				<td align="center" width="10%">
					<bean:message key="org.attr3"/>
				</td>
			</tr>
			</thead>
				<tbody>
			<% int i=0; String color;String check="";%>
			
			<logic:iterate id="group" name="list">
				
					<% i++; if(i%2==1) color="odd"; else color="even"; if(i==1) check="checked"; else check="";%>
				
				<tr  class="<%=color%>">
				<td align="center">
		<input type="radio"  name="id"  value="<bean:write name='group' property='id'/>" 
		onclick="javascript:onSelected('<bean:write name='group' property='id'/>','<bean:write name='group' property='groupTypeId'/>')"/>	
						</td>
				<td align="left">
						<bean:write name="group" property="id" filter="true"/>
					</td>
					<td align="left">
						<bean:write name="group" property="name" filter="true"/>					
					</td>
					
					
					
					<td align="center">
						
						<bean:write name="group" property="parentName" filter="true"/>
						
					</td>
					<td align="center">
						
					<bean:write  name="group" property="ownerName"  filter="true"/>
						
					</td>
					<td align="center">
						<bean:write name="group" property="attr1"/>
					</td>
						<td align="center">
						<bean:write name="group" property="attr2"/>
					</td>
						<td align="center">
						<bean:write name="group" property="attr3"/>
					</td>
				</tr>
				
			</logic:iterate>
			
	
			</tbody>
			</table>
			<logic:equal name="readonly" value="false">
	<input type="button" name="remove_button" value='<bean:message key="org.remove"/>' disabled="true" onclick="javascript:removeUser()">
				<input type="hidden" name="act"/>
			<input type="hidden" name="groupId"/>
			<input type="hidden" name="domain" value="<bean:write name="domain"/>"/>
			<input type="hidden" name="userId" value="<bean:write name="userId"/>"/>
			<input type="hidden" name="groupTypeId"/>
	</logic:equal>
	</form>
	
<script language="JavaScript">		
var st = new SortableTable(document.getElementById("table-1"),
	["None", "String","String",  "String", "String"]);
function onSelected(groupId,groupTypeId){
var frm = document.forms["form"];
frm.elements["groupId"].value=groupId;
frm.elements["groupTypeId"].value=groupTypeId;
frm.elements["remove_button"].disabled=false;
}
	function removeUser()
	{
	var frm = document.forms["form"];
	var id=(selectedRadiobox(frm,"id"));
	if(id==null) return;
	//if( !confirm("È·¶¨´Ó×éÖ¯ÖÐÈ¥³ýÓÃ»§£¿")) return;
	frm.elements["act"].value="removeMenber2";
	
	frm.submit();
	};

</script>
<%@ include file="/table_bottom.jsp" %>
<logic:notEmpty name="returnMsg">
	<script>
	parent.frames[0].location.reload();
	alert('<bean:write name="returnMsg"/>');
	</script>
	</logic:notEmpty>
</body>
</html:html>
